package com.example.demo.service;

import com.example.demo.entity.User;
import com.example.demo.service.impl.SchedualServerHiHystric;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "server-hi", fallback = SchedualServerHiHystric.class)
public interface SchedualServerHi {

    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    String sayHiFromClientOne(@RequestParam(value = "name") String name);


    @RequestMapping(value = "/get",method = RequestMethod.GET)
    String get();


    @RequestMapping(value = "/getAllUser", method = RequestMethod.GET)
    List<User> getAllUser();

    @RequestMapping(value = "/getAllUserRedis", method = RequestMethod.GET)
    List<User> getAllUserRedis();
}
